package ua.at.tsvetkov.samizdat;

import org.acra.ACRA;
import org.acra.annotation.ReportsCrashes;

import ua.at.tsvetkov.application.AppConfig;
import android.app.Application;

//@ReportsCrashes(formKey = "dF82STh2QzBUUU5wYkJCLVlTbkdJZFE6MQ")
public class AppMain extends Application {

	@Override
	public void onCreate() {
//		ACRA.init(this);
		super.onCreate();
		android.util.Log.v("============================", "================================================================================");
		android.util.Log.v("ACRA", "|     >>>>>>>>>>>>>>>>>>>>>> Error handler initiated >>>>>>>>>>>>>>>>>>>>>     |");
		AppConfig.init(this, false);
		AppConfig.createDir(Const.DIR_BOOKS);
		if (AppConfig.isNewApplication()) {
			AppConfig.putSetting(Key.GENRE_BOOKS_SORTING, Const.ORDER_TITLE);
			AppConfig.putSetting(Key.TEXT_SIZE, Const.DEFAULT_TEXT_SIZE, AppConfig.SAVE);
		}
		AppConfig.printInfo();

	}

}